//Granify Android SDK/com.granifyinc.granifysdk/Granify/setCurrentProduct
setCurrentProduct
[androidJvm]\
fun setCurrentProduct(sku: String, productId: String)
Notifies Granify which specific product on a product page is currently selected.
Placement
This function should be called immediately after trackProduct and when the focused item is changed on a product page. This includes:
- On application launch to a product page (call with the default selected product sku).
- On application resume from background to a product page (call with the selected product sku when the view loads).
- From a navigation action leading to a product page (call with the default selected product sku).
- User action that changes the selected product sku on a product page.
Parameters
androidJvm
sku | The SKU of the currently selected product. Must match the ID field in one of the products called in trackProduct. |
productId | The parent ID of the product. |